Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
catenary-curve
Advanced tools
Given two points and a length, this library will calculate and draw the catenary between two points, the "correct" way, so that it behaves natural (technically).
import { Catenary, Point } from 'catenary-curve'
// This is optional, you can also use a simple { x: 200, y: 300 } object.
let p1 = new Point(200, 300)
let p2 = new Point(250, 400)
let chain = new Catenary({
segments: 50,
iterationLimit: 100
})
const context = canvas.getContext('2d')
// The drawToCanvas function will only call the actual draw function (moveTo,
// lineTo, quadraticCurveTo), so you have to call beginPath() and stroke()
// yourself.
context.beginPath()
context.lineWidth = 1
context.strokeStyle = 'black'
chain.drawToCanvas(context, p1, p2, 500)
context.stroke()
The basis of this library is an ActionScript by poiasd, originally released on wonderfl.net, archived and preserved at http://wa.zozuar.org/code.php?c=8Bnl.
Unfortunately I wasn't able to find out who the original author was and ask them if and how they want to be mentioned/linked.
FAQs
Calculate the perfect catenary between two points
The npm package catenary-curve receives a total of 10,378 weekly downloads. As such, catenary-curve popularity was classified as popular.
We found that catenary-curve demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.